/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package UserInterface;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JLabel;

/**
 *
 * @author Home
 */
public class StringPattern implements Runnable {

    private String ss;
    private JLabel jl;

    public StringPattern(String ss, JLabel jl) {
        this.ss = ss;
        this.jl = jl;
    }

    public void run() {
        while (jl.isEnabled()) {
            int l = ss.length();
            String ss1 = ss.substring(0, l - 1);
            ss = ss.substring(l - 1).concat(ss1);
            jl.setText(ss);
            try {
                Thread.sleep(200);
            } catch (InterruptedException ex) {
                Logger.getLogger(StringPattern.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

    }
}
